import { createApp } from 'vue';
import App from './App.vue'
// avue库全局配置
import avueConfig from '@/config/avue'
// 引入router
import router from './router/index'
// 全局组件(为了avue里面可以直接使用部分组件)
import globalComp from '@/config/globalComponent'
import Avue from '@smallwei/avue';
import '@smallwei/avue/lib/index.css';
// 引入elmentPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入公共的
import '@/assets/style/index.scss'
import "@/assets/iconfont/iconfont.css";
// 缓存 pinia
import piniaPersist from 'pinia-plugin-persist'
import { createPinia } from 'pinia'
// 绑定按钮权限全局指令
import { permission } from '@/utils/permission'
import DataV from '@kjgl77/datav-vue3';
const app = createApp(App);
app.directive('permission', permission)
app.use(Avue, avueConfig);
app.use(DataV);
app.use(globalComp);

const pinia = createPinia()
pinia.use(piniaPersist)
app.use(pinia)
app.use(ElementPlus)
app.use(router);
app.mount('#app')
